#include <iostream>
#include <memory>
#include "tcpServer.hpp"

using namespace TcpServer;

void Uasge()
{
    std::cout << "Uasge : tip  ./tcpServer Serverport " << std::endl;     
}

int main(int argc , char* arvg[])
{
    if(argc != 2)
    {
        Uasge();
        exit(5);
    }
    
    uint16_t port = atoi(arvg[1]);

    std::unique_ptr<Server> tcpser(new Server(port));

    tcpser->init();
    tcpser->start();

    return 0;
}